import { createApp, type Directive } from 'vue'
import 'ant-design-vue/dist/reset.css'
import './plugins/i18n'
import App from './App.vue'
import router from './router'
import { setupStore } from '@/stores'
import 'vue-cropper/dist/index.css'
import 'vue-json-pretty/lib/styles.css'
import './utils/notice'
import 'animate.css'
import 'md-editor-v3/lib/style.css'
import * as directives from '@/directives'

const app = createApp(App)

// 自定义指令
Object.keys(directives).forEach((key) => {
  app.directive(key, (directives as { [key: string]: Directive })[key])
})

app.use(router)
setupStore(app)

app.mount('#app')
